package com.jaydenxiao.androidfire.ui.main.activity;

import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.jaydenxiao.androidfire.R;
import com.jaydenxiao.androidfire.ui.main.fragment.DateSource;
import com.jaydenxiao.common.base.BaseActivity;
import com.jaydenxiao.common.commonwidget.NormalTitleBar;

import butterknife.Bind;

public class NewSdetailActivity extends BaseActivity {


    @Bind(R.id.ntb)
    NormalTitleBar ntb;

    @Bind(R.id.container)
    LinearLayout container;


    @Override
    public int getLayoutId() {
        return R.layout.news_detail;
    }

    @Override
    public void initPresenter() {

    }

    @Override
    public void initView() {
        ntb.setTvLeftVisiable(false);
        ntb.setTitleText("详情");

        int postion = getIntent().getFlags();

        int[]  date =  DateSource.sounre.get(postion);

        for(int i=0;i< date.length;i++){
            ImageView view =new ImageView(this);
            view.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.WRAP_CONTENT));
            view.setAdjustViewBounds(true);
            view.setImageResource(date[i]);
            container.addView(view);
        }



    }
}
